﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace HigLabo.WindowsAzure.RestService.ServiceManagement
{
    public class UpdateAffinityGroup 
    {
        public static readonly String ElementName = "UpdateAffinityGroup";

        public String Description { get; private set; }
        public String Label { get; private set; }

        public UpdateAffinityGroup(String description, String label)
        {
            this.Description = description;
            this.Label = label;
        }
        public String CreateText()
        {
            var ns = XNamespace.Get("http://schemas.microsoft.com/windowsazure");
            var doc = new XDocument();
            var root = new XElement(ns.GetName(ElementName));
            doc.Add(root);
            root.Add(new XElement(ns.GetName("Label"), Base64Converter.To(this.Label)));
            root.Add(new XElement(ns.GetName("Description"), this.Description));
            return doc.ToString();
        }
    }
}
